// 二次封装缓存函数 cookie
import Cookies from 'js-cookie'
class Cookie {
  Cookies: any
  constructor() {
    this.Cookies = Cookies
  }
  set(name: string, value: string, options?: any) {
    const _options = {
      expires: 7,
      ...options
    }
    return this.Cookies.set(name, value, _options)
  }
  get(name: string) {
    return this.Cookies.get(name)
  }
  remove(name: string, options: any = {}) {
    return this.Cookies.remove(name, options)
  }
}

export default new Cookie();